joPAS
 
English Spanish
Web joPAS

Home

ScreenShots

Downloads

 

Documents

 

Developers

Forums

Links

 
Grupo PAS
 
SourceForge.net Logo
Support joPAS

 
   
 

Running functions in Octave

 

import org.jopas.*;

public class Example4 {
   

    /**
     * The constructor of the class have to start joPAS to run Octave because
     * Octave program takes a long time to start
     */
    public Example4() {
        Jopas jopas = new Jopas(); //joPAS inicialitation

       
        jopas.Load(5,"a");
        jopas.Load(7,"b");

        jopas.Execute("function y=suma(a,b)");
        jopas.Execute("y=a+b");
        jopas.Execute("endfunction");

        jopas.Execute("y=suma(a,b)");
       
        Matrix mY = jopas.Save("y");

        System.out.println(mY.getRealAt(0,0));

        System.exit(0);
    }

  public static void main(String av[]) {

        Example4 example4 = new Example4();

    }

}

 

 
 

Grupo PAS - Universidad de Deusto - 2005